from sanic import Sanic
from common.config.swagger import swagger
from common.route.routes import routes
from common.config import CONFIG

app = Sanic("test")

# swagger 配置
swagger(app)

# 路由相关
routes(app)

# 加载配置
app.config.from_object(CONFIG)


if __name__ == "__main__":
    app.run(host=app.config['HOST'], port=app.config['PORT'], debug=app.config['DEBUG'])
